package com.mdd.admin.service.system.impl;

import com.mdd.admin.service.system.ISystemRchargeConfigService;
import com.mdd.admin.validate.system.SystemRchargeConfingParam;
import com.mdd.common.utils.LsConfigUtil;
import org.springframework.stereotype.Service;

@Service
public class SystemRchargeConfigServiceImpl implements ISystemRchargeConfigService {

    /**
     * 新增或更新 用户充值配置
     *
     * @author panweiliang
     * @param systemRchargeConfingParam 参数
     */
    @Override
    public void addOrUpdate(SystemRchargeConfingParam systemRchargeConfingParam) {
        LsConfigUtil.set("recharge", "open", String.valueOf(systemRchargeConfingParam.getOpen()));
        LsConfigUtil.set("recharge", "min_amount", String.valueOf(systemRchargeConfingParam.getMinAmount()));
    }
}
